const commonConfig = require('./webpack.common')
const { merge } = require('webpack-merge')

const path = require('path')

module.exports = merge(commonConfig, {
    mode: 'development',
    devtool: 'cheap-module-eval-source-map',
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_module/,
                use: 'eslint-loader',
                enforce: 'pre'
            }
        ]
    },
    devServer: {
        contentBase: path.join(__dirname, 'dist'),
        port: 8012,
        hot: true
    }
})